{% extends 'admin/base_site.html' %}
{% load i18n admin_urls static admin_list %}

{% block extrastyle %}
  {{ block.super }}
  <link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css"%}">
  <style type="text/css">
    table.data-table tr td {
      max-width: 500px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  </style>
{% endblock %}

{% if not is_popup %}
  {% block breadcrumbs %}
    <div class="breadcrumbs">
      <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
      &rsaquo; Management pages
      &rsaquo; Analyze model fetches
    </div>
  {% endblock %}
{% endif %}

{% block content %}
  <div class="content-main">
    <h2>Missing Super Search Fields</h2>
    <div class="body">
      <p>
        This is a list of fields that are missing from the master list
        of Super Search fields. This is computed by taking a list of all
        fields that exist in the mappings of the last 3 weeks, then
        comparing that list to the list of known fields.
      </p>

      <table>
        <thead>
          <tr>
            <th>Field</th>
          </tr>
        </thead>
        <tbody>
          {% if missing_fields %}
            {% for field in missing_fields %}
              <tr>
                <td>{{ field }}</td>
              </tr>
            {% endfor %}
          {% else %}
            <tr>
              <td>
                No fields missing at the moment.
              </td>
            </tr>
          {% endif %}
        </tbody>
      </table>
    </div>
  </div>
{% endblock %}
